Skip to content

Add additional logic to CallHierarchyCore.getCompilationUnitNode() - #3016

Merged
jjohnstn merged 2 commits into
eclipse-jdt:masterfrom
jjohnstn:callhierarchyfix
Jun 2, 2026
Merged

Add additional logic to CallHierarchyCore.getCompilationUnitNode()#3016
jjohnstn merged 2 commits into
eclipse-jdt:masterfrom
jjohnstn:callhierarchyfix

Conversation

@jjohnstn

@jjohnstn jjohnstn commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

What it does

See issue.

How to test

Run jdt.ls test mentioned in issue.

Author checklist

- add check for class file to avoid checking for a java file name
  which won't find the .java extension and will return false
- fixes eclipse-jdt#3015
@jjohnstn jjohnstn self-assigned this Jun 1, 2026
@jjohnstn jjohnstn added the bug Something isn't working label Jun 1, 2026
@jjohnstn jjohnstn added this to the 4.41 M1 milestone Jun 1, 2026
@arcivanov

Copy link
Copy Markdown
Contributor

Since this regression was introduced by my PR #2881, I've prepared a regression test for this fix. The test creates a class folder with attached source, verifies the member is an IClassFile with a non-null buffer, and asserts that the outgoing callee hierarchy returns the expected callees via the Java AST path.

Commit: arcivanov@cc39ae870f

Feel free to cherry-pick or squash it into this PR. I couldn't push directly to your fork.

@datho7561 datho7561 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes the problem for me.

I think it'd be helpful to add the regression test that Arcadiy suggested.

@jjohnstn

jjohnstn commented Jun 2, 2026

Copy link
Copy Markdown
Contributor Author

This fixes the problem for me.

I think it'd be helpful to add the regression test that Arcadiy suggested.

Will do.

@jjohnstn
jjohnstn merged commit 42cbcf4 into eclipse-jdt:master Jun 2, 2026
13 checks passed
@jjohnstn
jjohnstn deleted the callhierarchyfix branch June 2, 2026 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Outgoing call hierarchy for methods in classes in a jar with attached source doesn't work since 4.40

3 participants